/***********************************************************************/
/*                                                                     */
/*  FILE        :initsct.h                                             */
/*  DATE        :Thu, Dec 07, 2006                                     */
/*  DESCRIPTION :define the macro for initialization of sections.      */
/*  CPU GROUP   :62P(ROM384K)                                          */
/*                                                                     */
/*  This file is generated by Renesas Project Generator (Ver.4.5).     */
/*                                                                     */
/***********************************************************************/

/***********************************************************
 *  initsct.h
 *
 *  clear for bss section
 *  transfer initialized data to data section
 *
 *  note: Do not modify
 *  
 * $Date: 2005/10/24 11:56:12 $
 * $Revision: 1.7 $
 **********************************************************/ 


#pragma section program interrupt
#define	sclear(X,Y)	_asm("	.initsct "X","Y"\n"\
			"	mov.b	#00H,R0L\n"\
			"	mov.w	#(topof	"X") ,A1\n"\
			"	mov.w	#sizeof	"X",R3\n"\
			"	sstr.b");

#define sclear_f(X,Y)	_asm("	.initsct "X","Y"\n"\
			"	push.w	#(sizeof "X")>>16\n"\
			"	push.w	#(sizeof "X")&0ffffH\n"\
			"	push.w	#(topof "X")>>16\n"\
			"	push.w	#(topof "X")&0ffffH\n"\
			"	.stk	8\n"\
			"	.glb	_bcopy\n"\
			"	.call	_bcopy,G\n"\
			"	jsr.a	_bcopy");	


#define scopy(X,Y)	_asm("	.initsct "X","Y"\n"\
			"	.initsct "X"I,rom"Y"\n"\
			"	mov.w	#(topof "X"I)&0ffffH,A0\n"\
			"	mov.b	#(topof "X"I)>>16,R1H\n"\
			"	mov.w	#(topof "X")&0ffffH,A1\n"\
			"	mov.w	#sizeof	"X",R3\n"\
			"	smovf.b");

#define	scopy_f(X,Y)	_asm("	.initsct "X","Y"\n"\
			"	.initsct "X"I,rom"Y"\n"\
			"	push.w	#(sizeof "X") >> 16\n"\
			"	push.w	#(sizeof "X") & 0ffffH\n"\
			"	push.w	#(topof "X") >> 16\n"\
			"	push.w	#(topof "X") & 0ffffH\n"\
			"	push.w	#(topof "X"I) >> 16\n"\
			"	push.w	#(topof "X"I) & 0ffffH\n"\
			"	.stk	12\n"\
			"	.glb	_bcopy\n"\
			"	.call	_bcopy,G\n"\
			"	jsr.a	_bcopy");

